using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace WebLog
{
    public class WebReqLog
    {
        [IsShow(true)]
        public long? id { get; set; }
        [Description("时间")]
        public DateTime Date { get; set; }
        [Description("成功与否")]
        public bool Success { get; set; }
        [Description("路径")]
        public string Path { get; set; }
        [IsShow(true)]
        public string Query { get; set; }
        [IsShow(true)]
        public string Body { get; set; }
        [Description("消息")]
        public string Message { get; set; }
        [IsShow(true)]
        [ControlType(ControlTypeEnum.文本框)]
        public object Data { get; set; }
        [Description("耗时(s)")]
        [ControlType(ControlTypeEnum.数值输入框)]
        public double Complete { get; set; }
        [Description("请求类型")]
        public string Method { get; set; }
        [IsShow(true)]
        public bool IsHttps { get; set; }
        [IsShow(true)]
        public string ContentType { get; set; }
        [IsShow(true)]
        public string Headers { get; set; }
        [IsShow(true)]
        public string RealName { get; set; }
        /// <summary>
        /// 关联的 执行的sql
        /// </summary>
        [IsShow(false)]
        internal List<string> Sqls { get; set; }
        /// <summary>
        /// 请求是否完成
        /// </summary>
        [IsShow(true)]
        [Description("是否完成")]
        public bool Completed { get; set; }
    }
}